import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}
export function adminLogin(data) {
  return request({
    url: '/user/adminLogin',
    method: 'post',
    data
  })
}


export function getInfo(Token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { Token }
  })
}

export function createTeacher(data) {
  return request({
    url: '/user/teacher',
    method: 'post',
    data
  })
}

export function getTeacher(query) {
  return request({
    url: '/user/teachers',
    method: 'get',
    params: query 
  })
}
export function getStudent(query) {
  return request({
    url: '/user/students',
    method: 'get',
    params: query 
  })
}

export function logout(Token) {
  return request({
    url: '/user/logout',
    method: 'post',
    data: Token
  })
}
